package com.samples.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class ConfigurationManager {

	private static final String APP_CONFIG_FILE_PATH = "App.conf.xml";
	private static final Properties APP_CONFIG_PROPERTY;

	static {
		APP_CONFIG_PROPERTY = new Properties();
		try {
			APP_CONFIG_PROPERTY.loadFromXML(new FileInputStream(new File(APP_CONFIG_FILE_PATH)));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static String getValue(String key) {
		return APP_CONFIG_PROPERTY.getProperty(key, "empty");
	}
}
